package com.fingard.dsp.distribute.dstrbset;

import com.fingard.xml.XElement;

public class DstrbItem {
/*<dstrbItem>
    <dstrbCode>BOCOM12</dstrbCode>
	<portForDSP readme="侦听端口，接收DSP的联机请求">9001</portForDSP>
	<filePortForDSP readme="侦听端口，接收DSP的文件请求">9002</filePortForDSP>
	<dspIP readme="远程DSP的ip">127.0.0.1</dspIP>
	<dspPort readme="远程DSP开启的接收银行报文的端口">9013</dspPort>
	<dspFilePort readme="远程DSP开启的文件端口">9014</dspFilePort>
    
    <portForBank readme="侦听端口，接收银行联机的请求">9025</portForBank>
    <filePortForBank readme="侦听端口，接收银行的文件请求">9026</filePortForBank>
    <bankIP readme="银行的ip">127.0.0.1</bankIP>
	<bankPort readme="银行的报文服务端口">9037</bankPort>
	<bankFilePort readme="银行的文件端口">9038</bankFilePort>
  </dstrbItem>*/
	public String dstrbCode = "";
	public String portForDSP = "";
	public String filePortForDSP = "";
	public String dspIP = "";
	public String dspPort = "";
	public String dspFilePort = "";
	
	public String insuIP = "";
	public String insuPort = "";
	public String insuFilePort = "";
	
	public String portForBank = "";
	public String filePortForBank = "";
	public String bankIP = "";
	public String bankPort = "";
	public String bankFilePort = "";
	
	public String gatewayUrl = "";
	public String charset = "";
	
	public String charsetForGateway = "";
	public String charsetForBank = "";
	
	public void fromXElement(XElement p_XE) throws Exception{
		dstrbCode = p_XE.getSingleTextNotNull("dstrbCode");
		portForDSP = p_XE.getSingleTextNotNull("portForDSP");
		filePortForDSP = p_XE.getSingleTextNotNull("filePortForDSP");
		dspIP = p_XE.getSingleTextNotNull("dspIP");
		dspPort = p_XE.getSingleTextNotNull("dspPort");
		dspFilePort = p_XE.getSingleTextNotNull("dspFilePort");
		
		insuIP = p_XE.getSingleTextNotNull("insuIP");
		insuPort = p_XE.getSingleTextNotNull("insuPort");
		insuFilePort = p_XE.getSingleTextNotNull("insuFilePort");
		
		portForBank = p_XE.getSingleTextNotNull("portForBank");
		filePortForBank = p_XE.getSingleTextNotNull("filePortForBank");
		bankIP = p_XE.getSingleTextNotNull("bankIP");
		bankPort = p_XE.getSingleTextNotNull("bankPort");
		bankFilePort = p_XE.getSingleTextNotNull("bankFilePort");
		gatewayUrl = p_XE.getSingleTextNotNull("gatewayUrl");
		charset = p_XE.getSingleTextNotNull("charset");
		charsetForGateway = p_XE.getSingleTextNotNull("charsetForGateway");
		charsetForBank = p_XE.getSingleTextNotNull("charsetForBank");
	}
}
